package at.fhj.swd11.leitner.ue5;

import javax.swing.*;
import java.awt.*;

@SuppressWarnings("serial")
public class MainGui extends JFrame {
	
	//Eigenschaften
	Controller controller = null;
	LeftPane leftPane = null;
	RightPane rightPane = null;
	SliderPane sliderPane = null;
	ValueHistory valueHistory = null;

	//Konstruktor
	public mainGui (Controller c){
		super("Temperaturkonverter");
		this.controller = c;
		leftPane = new LeftPane(this.controller);
		rightPane = new RightPane(this.controller);
		valueHistory = new ValueHistory();
		sliderPane = new SliderPane(this.controller);
		
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.getContentPane().add(leftPane, BorderLayout.WEST);
		this.getContentPane().add(rightPane, BorderLayout.EAST);
		this.getContentPane().add(valueHistory, BorderLayout.CENTER);
		this.getContentPane().add(slidePane, BorderLayout.SOUTH);
		
		this.setSize(500, 200); // Windowsize
		this.setVisible(true); // set window visible
	}
}
